#include <stdlib.h> 
#include <time.h>  
#include <stdio.h>
int SIZE=10;
void randomfill(int **);
void sort(int **);
////////////////////////////////////////////////////////////////
void randomfill(int* data[SIZE])
{
printf("Now i m here to randomly assign data\n");
 srand((unsigned)time(0)); 
  for(int i=0; i<SIZE; i++) 
        data[i] = (rand()%1000)+1;
printf("Now i have finished assiging randomly data\n"); 
return;
}
///////////////////////////////////////////////////////////////////
void sort(int* data[SIZE])
{
printf("Now i m here to sort data\n");
int swap=0;
for (int i = 1 ; i <  SIZE ; i++)
    for (int j=i; j >= 1; j--)
    {
      if (data[j] < data[j-1])
      {
        swap       = data[j];
        data[j]   = data[j-1];
        data[j-1] = swap;
       }
    }
printf("Now i have finish sorting data\n");
return;
}
////////////////////////////////////////////////////////////////////////
void main (void)
 {

int data[SIZE];
randomfill(&data[SIZE]);
  printf("Randomly Generated data in unsorted for is \n");
  for(int i=0; i<SIZE; i++)
    printf( "%d \n",data[i]);
sort(&data[SIZE]);
    printf("Sorted list in ascending order:\n");
   for (int c=0;c<SIZE;c++)
     printf("%d\n", data[c]);
 return;
}
/////////////////////////////////////////////////////////////////////////
